/*
* This file is part of WC2.
*
* WC2 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* WC2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with WC2; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*	Map.h - Map Class
*/

#ifndef MAP_H__
#define MAP_H__

#include "allegro.h"

class map
{
public:
	map();
	map(int mapw, int maph, int tilew, int tileh) 
	{
		map_width = mapw;
		map_height = maph;
		tile_width = tilew;
		tile_height = tileh;
	
	};
	~map();

struct tiles
{
	int id;
	int tilex;
	int tiley;

	bool safe;
    

	int get_tilex()
	{
		return tilex;
	}

	int get_tiley()
	{
		return tiley;
	}

	bool blocking;

	int get_blocked()
	{
		return blocking;
	}


}mapt[625];

struct tile_blocking
{
	bool blocked;
	int building;
	int terrain;

	int get_pass(int x, int y)
	{
		return blocked;
	}

	int get_passx(int x)
	{
		return blocked;
	}

	int get_passy(int y)
	{
		return blocked;
	}

	int get_building(int x, int y)
	{
		return building;
	}

	int get_terrain(int x, int y)
	{
		return terrain;
	}
} tblock[30][30];

	int get_map_width()
	{
		return map_width;
	}
	
	int get_map_height()
	{
		return map_height;
	}
	
	int get_tile_width()
	{
		return tile_width;
	}
	
	int get_tile_height()
	{
		return tile_height;
	}
	


private:
	int map_width;
	int map_height;
	int tile_width;
	int tile_height;
	DATAFILE *mapdat;
};


#endif



